(bound-and-true-p evil-local-mode)
(string-match-p (format "<%s-state>$" evil-state) key-desc))
(setq bindings
- (append bindings
- (which-key--get-keymap-bindings def all prefix))))
+ ;; this function keeps the latter of the two duplicates
+ ;; which will be the evil binding
+ (cl-remove-duplicates
+ (append bindings
+ (which-key--get-keymap-bindings def all prefix))
+ :test (lambda (a b) (string= (car a) (car b))))))
((and (keymapp def)
(string-match-p which-key--evil-keys-regexp key-desc)))
((and (keymapp def)